package com.seari.tunnel.mapper;

import java.util.List;
import java.util.Set;

import org.springframework.stereotype.Repository;

import com.jframe.mybatis.paginator.domain.PageBounds;
import com.jframe.mybatis.paginator.domain.PageList;
import com.seari.tunnel.entity.Role;
import com.seari.tunnel.entity.User;

@Repository
public interface UserMapper {

	int countAll();
	PageList<User> findAll();
	
	PageList<User> findPaging(User user,PageBounds rb);
	
	User getUserByName(String username);
	
	User getUserById(long id);

	void createUser(User user);
	
	void updateUser(User user);
	
	void deleteUserById(long id);
	
	void deleteUserRoleByUserId(long id);
	
	void deleteUsers(String[] ids);
	
	int userNameIsExist(User user);
	
	void updateUserPassword(User user);
	
	Set<String> findRoleByUserName(String userName);
	
	List<User> findSecurityUser();
	
	void addSecurityUser(User user);
	
	Role getUserRole(long id);
}
